package com.yh.homestay.controller;

import com.yh.homestay.aop.SystemLog;
import com.yh.homestay.common.HomeStayResult;
import com.yh.homestay.service.HomeStayOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName HomeStayOrderController
 * @Description 订单Controller
 * @Date 2020/1/13 16:26
 */
@RestController
@Api(description = "订单管理")
@RequestMapping(value = "/order")
public class HomeStayOrderController {

    @Autowired
    private HomeStayOrderService homeStayOrderServicel;

    /**
     * @param page
     * @param limit
     * @param orderType
     * @param orderPayType
     * @param orderId
     * @Date: 2020/1/13 16:25
     * @Description: 订单列表
     * @return: com.yh.homestay.common.HomeStayResult
     */
    @RequestMapping(value = "/list",method = RequestMethod.POST)
    @SystemLog(methods = "订单列表", module = "订单管理")
    @ApiOperation(value = "获取所有订单列表", notes = "获取所有订单信息或者模糊查询")
    public HomeStayResult findCapitalItemAll(Integer page, Integer limit, Integer orderType, Integer orderPayType, Long orderId) {
        return homeStayOrderServicel.findAllOrder(page, limit, orderType, orderPayType, orderId);
    }

}
